import { IsString, IsNotEmpty, Length, IsInt, Min } from 'class-validator';

export class CreateCourseDto {
  @IsString()
  cname: string;

  @IsString()
  cdept: string;

  @IsInt()
  tno: number; // 改为教师编号

  @IsInt()
  @Min(1)
  credit?: number; // 可选字段，不传时使用默认值
}